// 控件组件列表
const widgetComponents = {}
// 控件类型对应的标签列表
const widgetTags = {}
const slotsFiles = import.meta.glob('./widget-*/index.js', { import: 'default', eager: true })
Object.keys(slotsFiles).forEach(key => {
    const tag = key.replace(/^.\/(.*)\/\w+\.\w+$/, '$1')
    const widgetTag = tag.replace(/^\w+\-(.*)$/, '$1')
    const value = slotsFiles[key]
    widgetComponents[value.name] = value
    widgetTags[widgetTag] = value.name
})
export {
    widgetComponents,
    widgetTags
}